package com.can.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.can.domain.ResponseResult;
import com.can.domain.entity.Article;
import com.can.domain.vo.ArticleVO;
import com.can.domain.vo.PageVO;

public interface ArticleService extends IService<Article> {

    /**
     * 热门文章
     * @return
     */
    ResponseResult hotArticleList();

    /**
     * 文章分页
     *
     * @param pageNum
     * @param pageSize
     * @param categoryId
     * @return
     */
    ResponseResult articleList(Integer pageNum, Integer pageSize, Long categoryId);

    /**
     * 文章详情
     *
     * @param id
     * @return
     */
    ResponseResult getArticleDetail(Long id);


    /**
     * 增加文章浏览量
     * @param id
     * @return
     */
    ResponseResult updateViewCount(Long id);

    ResponseResult add(ArticleVO articleVO);

    PageVO page(Integer pageNum, Integer pageSize, ArticleVO articleVO);

    ResponseResult update(ArticleVO articleVO);

}
